{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
      <section class="content">
          <div class="row">
              <section class="col-lg-12 connectedSortable">
                  <div class="box box-default box-solid">
                      <div class="box-header with-border">
                          <span class="fa fa-thumbs-up" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                          <p class="box-title">继续教育</p>
                          <a href="index.php?a=keep.add&type={%$type%}" class="btn btn-primary btn-sm" style="float:right; color:#fff;">新 增</a>
                      </div>
                      <div class="box-body">
                          <!--检索-->
                          <form name="myform" action="" method="post">
                          <div class="col-md-3 form-group">
                              <label class="col-sm-4 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                  项目名称：
                              </label>
                              <div class="input-group col-md-8 col-xs-12">
                                  <input type="text" name="keep_name" class="form-control">
                              </div>
                          </div>
                          <div class="col-md-3 form-group" style="padding:0;">
                              <label for="inputPassword3" class="col-sm-4 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
                                  {%if $keep_type==2%}提交者：{%else%}教师姓名：{%/if%}
                              </label>
                              <div class="input-group col-md-8 col-xs-12">
                                  <input type="text" name="keep_owner" class="form-control">
                              </div>
                          </div>
                          <div class="col-md-5 col-xs-12 form-group" style="padding:0;">
                              <label for="inputPassword3" class="col-sm-2 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; ">
                                  时间：
                              </label>
                              <div class="input-group col-md-4" style="float:left;">
                                  <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
                                  <div class="input-group-addon" style="padding:6px 7px;">
                                      <i class="fa fa-calendar"></i>
                                  </div>
                              </div>
                              <span style="float:left;">  ~  </span >
                              <div class="input-group col-md-4" style="float:left;">
                                  <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
                                  <div class="input-group-addon" style="padding:6px 7px;">
                                      <i class="fa fa-calendar"></i>
                                  </div>
                              </div>
                          </div>
                          <div class="col-md-1 col-xs-12" style="padding:0">
                              <button type="submit" class="btn btn-warning">查 询</button>
                          </div>
                          <div style="clear:both; height:10px;"></div>
                          <!--检索-->
                          <a href="index.php?a=keep.list&type=1" {%if $type eq 1 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>继续教育</a>
                          <a href="index.php?a=keep.list&type=2" {%if $type eq 2 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>其他资料</a>
                          <span style="float:right"> 总共有{%$count%}条记录</span>
                          <table class="table table-bordered table-striped" id="mytable">

                              <thead>
                              <tr style=" background-color:#5fb2dc;">
                                  {%if $type eq 1 %}
                                  <td>项目名称</td>
                                  <td>教师姓名</td>
                                  <td>培训日期</td>
                                  <td>培训机构</td>
                                  <td>学时</td>
                                  <td>学分</td>
                                  <td>实际学分</td>
								  <td>备注</td>
                                  {%/if%}
                                  {%if $type eq 2 %}
                                  <td>项目名称</td>
                                  <td>提交者</td>
                                  <td>提交日期</td>
								  <td>内容</td>
                                  {%/if%}
                                  
                                  <td  width="140">操作</td>
                              </tr>
                              </thead>
                              {%foreach from=$keep_lists key=key item=value%}
                              <tr>
                                  <td>{%$value.keep_name%}</td>
								  {%if $type eq 1 %}
                                  <td>{%$value.keep_owner%}</td>
								  {%else %}
									<td>{%$value.user_name%}</td>
								  {%/if%}
                                  <td>{%$value.keep_time%}</td>
                                  {%if $type eq 1 %}
                                  <td>{%$value.keep_unit%}</td>
                                  <td>{%$value.keep_hour%}</td>
                                  <td>{%$value.keep_min%}</td>
                                  <td>{%$value.keep_score%}</td>
                                  <td>{%$value.keep_remark%}</td>
								  {%else%}
								  <td>{%$value.keep_content%}</td>
								  {%/if%}
                                  <td>
                                      <a href="index.php?a=keep.info&type={%$type%}&keep_id={%$value.keep_id%}" class="btn btn-success btn-sm" title="查看"><i class="fa fa-search"></i></a>
                                      <a href="index.php?a=keep.update&type={%$type%}&keep_id={%$value.keep_id%}" class="btn btn-warning btn-sm" title="修改"><i class="fa fa-edit (alias)"></i></a>
                                      <a href="index.php?a=keep.del&keep_id={%$value.keep_id%}" class="btn btn-danger btn-sm" title="删除" onclick="if(confirm('警告！确认删除信息?')==false)return false;"><i class="fa fa-trash"></i></a>
                                  </td>
                              </tr>
                              {%/foreach%}



                          </table>
                              <div class="box-footer">
                                  {%$page%}
                              </div>
                              </form>
                      </div><!--box-body -->
                  </div><!--box box-default box-solid-->
              </section>
          </div><!--row-->
      </section>
 </div>
  <!--主要内容结束-->
 
  {%include file="index.footer.tpl.php"%}
<script>
    $(function() {
        $( "#from" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#to" ).datepicker( "option", "minDate", selectedDate );
            }
        });
        $( "#to" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#from" ).datepicker( "option", "maxDate", selectedDate );
            }
        });
    });
</script>

